package com.szj.service.impl;

import com.szj.entity.Admin;
import com.szj.entity.Clazz;
import com.szj.entity.Grade;
import com.szj.entity.LoginForm;
import com.szj.mapper.AdminMapper;
import com.szj.mapper.ClazzMapper;
import com.szj.service.AdminService;
import com.szj.service.ClazzService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ClazzServiceImpl implements ClazzService {

    @Autowired
    private ClazzMapper clazzMapper;


    //添加班级信息
    @Override
    public int clazzAdd(Clazz clazz) {
        return clazzMapper.clazzAdd(clazz);
    }


    //删除班级信息
    @Override
    public int clazzDel(Integer[] ids) {
        return clazzMapper.clazzDel(ids);
    }



    //修改班级信息
    @Override
    public int clazzUp(Clazz clazz) {
        return clazzMapper.clazzUp(clazz);
    }



    //查找指定班级名称是否存在
    @Override
    public Clazz findByName(String clazzName) {
        return clazzMapper.findByName(clazzName);
    }


    //查询班级信息
    @Override
    public List<Clazz> selectList(Clazz clazz) {
        return clazzMapper.selectList(clazz);
    }
}